﻿using _047_DecoratorSample;
using static System.Console;

/*
 * 装饰器模式
 */

// 单独给手机贴膜
Phone phone = new Phone();
phone.Print();
Decorator sticker = new Sticker(phone);
sticker.AddDecorator();

// 给手机贴膜和安装保护壳
phone = new Phone();
phone.Print();
Decorator decorator = new Sticker(phone);
decorator.AddDecorator();
decorator = new ProtectiveCase(decorator);
decorator.AddDecorator();

ReadLine();